package cn.gemiman.daoyi.module.iot.dal.dataobject.userequipment;

import cn.gemiman.daoyi.framework.mybatis.core.dataobject.BaseDO;
import cn.gemiman.daoyi.module.iot.dal.dataobject.userequipmentplace.UserEquipmentPlaceDO;
import cn.gemiman.daoyi.module.iot.enums.DictTypeConstants;
import cn.gemiman.daoyi.module.member.api.user.dto.MemberUserRespDTO;
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

/**
 * 会员设备 DO
 *
 * @author 道一源码
 */
@TableName("iot_user_equipment")
@KeySequence("iot_user_equipment_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class UserEquipmentDO extends BaseDO {

    /**
     * 编号
     */
    @TableId
    private Long id;
    /**
     * 设备厂商
     * <p>
     * 枚举 {@link DictTypeConstants#EQUIPMENT_MANUFACTURER}
     */
    private Integer equipmentManufacturer;
    /**
     * 设备编号
     */
    private Long equipmentId;
    @TableField(exist = false)
    private JSONObject equipment;
    /**
     * 场所编号
     */
    private Long placeId;
    @TableField(exist = false)
    private UserEquipmentPlaceDO place;
    /**
     * 会员编号
     */
    private Long memberUserId;
    @TableField(exist = false)
    private MemberUserRespDTO memberUser;
    /**
     * 员工部门编号
     */
    private Long adminDeptId;
    /**
     * 员工编号
     */
    private Long adminUserId;

}
